package com.sun.stockexchangesimulate.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;

import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * 股票投资者表
 * @author sun
 * @TableName investor
 */
@TableName(value ="investor")
@Data
@Builder
@Getter
@Setter
public class Investor implements Serializable {
    /**
     * 投资者id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 交易策略
     */
    private String tradingStrategy;

    /**
     * 现金数量
     */
    private BigDecimal cash;

    /**
     * 可用现金,可用现金=现金数量-冻结金额
     * 下单后会冻结金额，订单完成后解冻金额，直接减扣现金
     */
    private BigDecimal availableCash;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}